#pragma once

#include<iostream>
#include<vector>
using namespace std;

namespace bit
{
	template<size_t N>
	class bitset
	{
		bitset()
		{
			_bs.resize(N / 32 + 1);
		}

		void set(size_t x)
		{
			int i = x / 32;
			int a = x % 32;

			_bs[i] |= (1 << a);
		}

		void reset(size_t x)
		{
			int i = x / 32;
			int a = x % 32;

			_bs[i] |= (~(1 << a));
		}

		bool rest(size_t X)
		{
			int i = x / 32;
			int a = x % 32;

			return _bs[i] & (1 << a);
		}

	private:
		vector<int> _bs;
	};
}

